<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>添加物品</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #F5F0FF;
            margin: 0;
            padding: 0;
            text-align: center;
        }

        form {
            background-color: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
            width: 400px;
            margin: 20px auto;
            /* 表单背景添加淡紫色系渐变 */
            background: linear-gradient(to bottom, #F0E6FF, #E6D9FF);
        }

        h2 {
            text-align: center;
            margin-bottom: 25px;
            color: #8A2BE2;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: bold;
            color: #333;
        }

        input[type="text"],
        input[type="number"] {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 4px;
        }

        textarea {
            width: 100%;
            padding: 10px;
            margin-bottom: 20px;
            border: 1px solid #ccc;
            border-radius: 4px;
            resize: vertical;
        }

        input[type="submit"] {
            background-color: #8A2BE2;
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.3s ease;
        }

        input[type="submit"]:hover {
            background-color: #6A1F94;
        }
    </style>
</head>

<body>
    <form method="post">
        <h2>添加物品</h2>
        <label for="name">物品名称</label>
        <input type="text" id="name" name="name" placeholder="请输入物品名称" required />
        <label for="description">物品描述</label>
        <textarea id="description" name="description" placeholder="请输入物品描述"></textarea>
        <label for="quantity">物品数量</label>
        <input type="number" id="quantity" name="quantity" placeholder="请输入物品数量" required />
        <label for="category">物品类别</label>
        <input type="text" id="category" name="category" placeholder="请输入物品类别" />
        <input type="submit" value="添加" />
    </form>
</body>

</html>